import { request } from '@/utils/request'
import type { Swipers, Menu, Goods, detail } from '@/types/home'

//首页轮播图
export const getSwipers = () => {
  return request<Swipers[]>({
    url: 'banner/list'
  })
}
//菜单列表
export const Menus = () => {
  return request<Menu[]>({
    url: 'menu/list'
  })
}
//商品列表
export const getGoods = (count = 1, limitNum = 10) => {
  return request<Goods[]>({
    url: 'pro/list',
    data: {
      count,
      limitNum
    }
  })
}
//商品详情
export const getGoodsDetail = (proid: string) => {
  return request<Goods>({
    url: `pro/detail/${proid}`
  })
}
